package com.tzstcl.sys.user.service.impl;

import com.tzstcl.sys.user.mapper.SysDeptPostMapper;
import com.tzstcl.sys.user.model.SysDeptPost;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;

/**
 * @author haocj
 * 角色权限service
 */
@Service
public class SysDeptPostService {

    @Resource
    private SysDeptPostMapper sysDeptPostMapper;

    public SysDeptPost get(Long id) {
        return sysDeptPostMapper.get(id);
    }

    @Transactional(rollbackFor = Exception.class)
    public void save(SysDeptPost sysDeptPost) {
        sysDeptPostMapper.save(sysDeptPost);
    }

    @Transactional(rollbackFor = Exception.class)
    public void delete(Long id) {
        sysDeptPostMapper.deleteById(id);
    }
}
